<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a="http://richfaces.org/a4j" xmlns:r="http://richfaces.org/rich"
	xmlns:t="http://myfaces.apache.org/tomahawk" template="/template.xhtml">
	<ui:define name="title">Формирование отчета</ui:define>
	<ui:define name="body">
		<r:panel>
			<f:facet name="header">Формирование отчета</f:facet>
			<h:form id="registration">
				<r:calendar locale="ru" popup="true" datePattern="yyyy-MM-dd"
					showApplyButton="false" cellWidth="24px" cellHeight="22px"
					style="width:200px"
					value="#{reportForWorkingDayService.report.workingDay.day.date}" />
				<ui:repeat var="project" value="#{projectService.projectList}">
					<r:simpleTogglePanel switchType="client" label="#{project.name}"
						opened="false">
						<h:outputText value="#{project.description}" />
						<br />
						<h:inputTextarea cols="60" rows="10"
							value="#{reportForWorkingDayService.report.workingDayOnProjectMap.get(project.id).description}" />
						<br />
						<r:inputNumberSpinner
							value="#{reportForWorkingDayService.report.workingDayOnProjectMap.get(project.id).amountMinuts}"
							step="15" minValue="0" maxValue="1440" />
					</r:simpleTogglePanel>
				</ui:repeat>
				<h:inputTextarea cols="60" rows="10"
					value="#{reportForWorkingDayService.report.workingDay.description}" />
				<br />
				<r:inputNumberSpinner
					value="#{reportForWorkingDayService.report.workingDay.amountMinuts}"
					step="15" minValue="0" maxValue="1440" />
				<br />
				<h:commandButton action="#{reportForWorkingDayService.create}"
					value="Сохранить" />
				<s:button value="Отмена" view="/main.xhtml" />
			</h:form>
		</r:panel>
	</ui:define>
</ui:composition>